package com.ygqh.baby.mapper;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.model.AdminPurchaseDetailInCount;
import com.ygqh.baby.po.AdminPurchaseDetail;
import com.ygqh.baby.po.AdminPurchaseDetailExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface AdminPurchaseDetailMapper {
	int countByExample(AdminPurchaseDetailExample example);

	int deleteByExample(AdminPurchaseDetailExample example);

	int deleteByPrimaryKey(Long id);

	int insert(AdminPurchaseDetail record);

	int insertSelective(AdminPurchaseDetail record);

	List<AdminPurchaseDetail> selectByExample(AdminPurchaseDetailExample example);

	AdminPurchaseDetail selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") AdminPurchaseDetail record, @Param("example") AdminPurchaseDetailExample example);

	int updateByExample(@Param("record") AdminPurchaseDetail record, @Param("example") AdminPurchaseDetailExample example);

	int updateByPrimaryKeySelective(AdminPurchaseDetail record);

	int updateByPrimaryKey(AdminPurchaseDetail record);

	List<AdminPurchaseDetail> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("q") String q);

	int countSuper(@Param("q") String q);

	void insertDetail(@Param("detailList") List<AdminPurchaseDetail> detailList);

	int updateStockAmountBatch(@Param("detailList") List<AdminPurchaseDetail> detailList);

	List<AdminPurchaseDetailInCount> selectPurchaseDetailInStockCountByContractCode(String contractCode);

}